#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int arr[1000][10000];
int main()
{
	int n = 0;
	scanf("%d", &n);
	for (int i = 0; i < n; i++)
	{
		arr[i][0] = arr[i][i] = 1;
	}
	for (int i = 2; i < n; i++)
	{
		for (int j = 1; j < i; j++)
		{
			arr[i][j] = arr[i - 1][j - 1] + arr[i - 1][j];
		}
	}
	for (int i = 0; i < n; i++)
	{
		for (int j = 0; j < n - i; j++)
		{
			printf("  ");
		}
		for (int k = 0; k < i + 1; k++)
		{
			printf("%6d", arr[i][k]);
		}
		putchar('\n');
	}
	return 0;
}